package leetcode.code0148;

import leetcode.IDebug;
import leetcode.helper.HelpDebug;
import leetcode.helper.tree.ListNode;


public abstract class Solution148 implements IDebug {

	public abstract ListNode sortList(ListNode head);

	@Override
	public void debug1() {
		String str = "[4,2,1,3]";
		ListNode head = ListNode.set(HelpDebug.str2array3(str));
		ListNode r = this.sortList(head);
		ListNode e = ListNode.set(HelpDebug.str2array3("[1,2,3,4]"));
		HelpDebug.compare(e, r);
	}

	@Override
	public void debug2() {
		String str = "[-1,5,3,4,0]";
		ListNode head = ListNode.set(HelpDebug.str2array3(str));
		ListNode r = this.sortList(head);
		ListNode e = ListNode.set(HelpDebug.str2array3("[-1,0,3,4,5]"));
		HelpDebug.compare(e, r);
	}

	@Override
	public void debug3() {
		String str = "[]";
		ListNode head = ListNode.set(HelpDebug.str2array3(str));
		ListNode r = this.sortList(head);
		ListNode e = ListNode.set(HelpDebug.str2array3("[]"));
		HelpDebug.compare(e, r);
	}

	@Override
	public void debug4() {
		// TODO Auto-generated method stub

	}

}
